From: Bryan Tong Minh Date: Mon, 12 May 2008 14:12:51 +0000 (+0000) Subject: (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation X-Git-Tag: 1.31.0-rc.0~47699 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=b3aaa8e4a6308c3c2939b2aae6393cb738ee3691;p=lhc%2Fweb%2Fwiklou.git (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1093931cda..1934dcf0dd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -269,6 +269,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14058) Support pipe trick for namespaces and interwikis with "-" * Message name filter on Special:Allmessages now case-insensitive * (bug 13943) Fix image redirect behaviour on image pages +* (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation === API changes in 1.13 === diff --git a/includes/Title.php b/includes/Title.php index 1637a3e596..c7bf1dab3f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2440,7 +2440,8 @@ class Title { } } else { $tp = $nt->getTitleProtection(); - if ( $tp and !$wgUser->isAllowed( $tp['pt_create_perm'] ) ) { + $right = ( $tp['pt_create_perm'] == 'sysop' ) ? 'protect' : $tp['pt_create_perm']; + if ( $tp and !$wgUser->isAllowed( $right ) ) { return 'cantmove-titleprotected'; } }